package com.qq.mall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qq.mall.beans.UserAddr;
import com.qq.mall.mapper.UserAddrMapper;
import com.qq.mall.service.UserAddrService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class UserAddrServiceImpl extends ServiceImpl<UserAddrMapper, UserAddr> implements UserAddrService {
    @Resource
    private UserAddrMapper userAddrMapper;
    @Override
    public List<UserAddr> getAddrById(String UserId) {
        QueryWrapper<UserAddr> userAddrQueryWrapper = new QueryWrapper<>();
        userAddrQueryWrapper.eq("user_id",UserId);
        List<UserAddr> userAddr = userAddrMapper.selectList(userAddrQueryWrapper);
        return userAddr;
    }
}
